package com.qfedu.entity;

import java.io.Serializable;

/**
 * 学生 与 student_tb 对应
 *   1.get ser
 *   2.toString
 *   3.如果写有参，必须写无参构造
 *   4.必须实现序列化
 *              对象网络间传输
 *              对象保存到文件
 *
 *  一对多，一个学生多个成绩
 */
public class Student implements Serializable {

    private int id;

    private String name;

    private int age;

    private String sex;

    private float height;

    // 对应 表中 student_info
    private String studentInfo;





    public Student() {
    }

    public Student(int id, String name, int age, String sex, float height) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.height = height;
    }

    public String getStudentInfo() {
        return studentInfo;
    }

    public void setStudentInfo(String studentInfo) {
        this.studentInfo = studentInfo;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public float getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }


    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", height=" + height +
                ", studentInfo='" + studentInfo + '\'' +

                '}';
    }
}
